Hello community, I wrote a function for opening modules, handling the different modes (read only, sharable, exclusive edit, as well as displayed or not). When executing the code, I observed some strange results, which I can't explain. For testing purposes I wrote following sample code:
string strModule = "any full module path name"
Module mCurrModule = null;
void GetStatus(Module p_mModule)
{
if (null p_mModule)
{
print "No module handle\n";
}
else
{
print "Visible: " (isVisible(p_mModule)?"Yes":"No") "\n"
print "ReadOnly: " (isRead(p_mModule)?"Yes":"No") "\n"
print "Shareable: " (isShare(p_mModule)?"Yes":"No") "\n"
print "Exclusive: " (isEdit(p_mModule)?"Yes":"No") "\n"
}
print "\n";
}
// Precondition: Ensure, module is closed!!!
////////////////////////////////////////////
GetStatus(mCurrModule);
// 1.) Open read only in hidden mode
mCurrModule = read(strModule, false);
GetStatus(mCurrModule);
// 2.) Open shareable in hidden mode
mCurrModule = share(strModule, false);
GetStatus(mCurrModule);
// 3.) Open exclusive in hidden mode
mCurrModule = edit(strModule, false);
GetStatus(mCurrModule);
// 4.) Open read only in visible mode
mCurrModule = read(strModule, true);
GetStatus(mCurrModule);
// 5.) Open shareable in visible mode
mCurrModule = share(strModule, true);
GetStatus(mCurrModule);
// 6.) Open exclusive in visible mode
mCurrModule = edit(strModule, true);
GetStatus(mCurrModule);
The results of the test run is: Precondition No module handle 1.) read(strModule, false): Visible: No ReadOnly: Yes Shareable: No Exclusive: No --> As expected 2.) share(strModule, false): Visible: No ReadOnly: No Shareable: Yes Exclusive: No --> As expected 3.) edit(strModule, false): Visible: No ReadOnly: No Shareable: Yes Exclusive: No --> ??? Why still in shareable mode??? 4.) read(strModule, true): Visible: Yes ReadOnly: No Shareable: Yes Exclusive: No --> As expected; keeps last "highest" mode, but now visible 5.) share(strModule, true): Visible: Yes ReadOnly: No Shareable: Yes Exclusive: No --> As expected 6.) edit(strModule, true): Visible: Yes ReadOnly: No Shareable: Yes Exclusive: No --> ??? Why still in shareable mode??? Can anybody explain the results of step 3 and 6? Why keeps the module in the shareable mode??? What is the correct sequence to enhance the edit mode from shareable to exclusive?
Used versions: DOORS server: 9.6.1.11 DOORS client: 9.6.1.8, Build 96635
Best regards,
Michael MichaelBrockhaus - Mon Oct 29 07:25:54 EDT 2018 |
Re: Open module in edit mode does strange things (keeps in shareable mode) That is a "feature" of DOORS, you cannot go from shareable to exclusive edit and there is no function for it. You either have to close the module or downgrade to read-only and then open in Exclusive Edit. See this discussion https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014926341
|
Re: Open module in edit mode does strange things (keeps in shareable mode) PekkaMakinen - Mon Oct 29 08:17:37 EDT 2018 That is a "feature" of DOORS, you cannot go from shareable to exclusive edit and there is no function for it. You either have to close the module or downgrade to read-only and then open in Exclusive Edit. See this discussion https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014926341
Grrrr. I wonder if someday I can use the search function as requested... Sorry for this post; I really searched before, but have not found your linked post. Thank you very, very much. |
Re: Open module in edit mode does strange things (keeps in shareable mode) MichaelBrockhaus - Mon Oct 29 08:23:04 EDT 2018 Grrrr. I wonder if someday I can use the search function as requested... Sorry for this post; I really searched before, but have not found your linked post. Thank you very, very much. In my experience Google works better better in searching than the search engine built in this forum: I just prefix every search with "doors dxl" to give Google the correct context. |